package jrain.fw.http.common.handler.rest;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import jrain.fw.core.utils.FwUtils;
import jrain.fw.http.common.consts.HttpConsts;
import jrain.fw.http.common.handler.HttpHandler;
import jrain.fw.http.common.rest.RestProvider;

/**
 * <pre>
 * 作者：3244924214@qq.com 
 * 描述：Rest处理类
 * </pre>
 */
public class RestHandler implements HttpHandler {

	public RestHandler() {

	}

	@Override
	public boolean handler(HttpServletRequest request, HttpServletResponse response) throws Exception {
		RestProvider provider = FwUtils.getServiceContext().getService(HttpConsts.S_HTTP_REST_PROVIDER, RestProvider.class);
		return provider.handler(request, response);
	}

}
